function f()
    println("f starting...")
    println("f pause 1...")
    yield()
    println("f back 1 and pause 2...")
    yield()
    println("f back.")
    println("f finished.")
end

function g()
    println("g starting...")
    println("g pause 1...")
    yield()
    println("g back 1 and pause 2...")
    yield()
    println("g back.")
    println("g finished.")
end

 t1 = Task(f)
 t2 = Task(g)

 schedule(t1)
 schedule(t2)

 read(STDIN, Char)